<%@ page import="registerallocator.Curso" %>



<div class="fieldcontain ${hasErrors(bean: cursoInstance, field: 'nome', 'error')} required">
	<label for="nome">
		<g:message code="curso.nome.label" default="Nome" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="nome" required="" value="${cursoInstance?.nome}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: cursoInstance, field: 'turno', 'error')} required">
	<label for="turno">
		<g:message code="curso.turno.label" default="Turno" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="turno" required="" value="${cursoInstance?.turno}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: cursoInstance, field: 'coordenador', 'error')} required">
	<label for="coordenador">
		<g:message code="curso.coordenador.label" default="Coordenador" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="coordenador" name="coordenador.id" from="${registerallocator.Coordenador.list()}" optionKey="id" required="" value="${cursoInstance?.coordenador?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: cursoInstance, field: 'grades', 'error')} ">
	<label for="grades">
		<g:message code="curso.grades.label" default="Grades" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${cursoInstance?.grades?}" var="g">
    <li><g:link controller="grade" action="show" id="${g.id}">${g?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="grade" action="create" params="['curso.id': cursoInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'grade.label', default: 'Grade')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: cursoInstance, field: 'professores', 'error')} ">
	<label for="professores">
		<g:message code="curso.professores.label" default="Professores" />
		
	</label>
	<g:select name="professores" from="${registerallocator.Professor.list()}" multiple="multiple" optionKey="id" size="5" value="${cursoInstance?.professores*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: cursoInstance, field: 'salas', 'error')} ">
	<label for="salas">
		<g:message code="curso.salas.label" default="Salas" />
		
	</label>
	<g:select name="salas" from="${registerallocator.Sala.list()}" multiple="multiple" optionKey="id" size="5" value="${cursoInstance?.salas*.id}" class="many-to-many"/>
</div>

